<template>
  <div>
    <Header></Header>
    <div class="success-wrap">
      <img src="~@/assets/img/img_1_811.png" alt />
      <h1>注册成功</h1>
      <p class="p1">
        由于魔法云后台功能较多
        <br />我们建议您用电脑端访问
      </p>

      <p class="p2">
        请浏览器输入
        <span>mfu.cn</span>
        进入后台
      </p>
    </div>

    <p class="p3">
      添加客服微信 mfucn118
      &nbsp;&nbsp;
      <span
        ref="copy"
        data-clipboard-action="copy"
        data-clipboard-text="mfucn118"
      >复制</span>
      <br />有专属客户顾问为您提供操作帮助和服务咨询
    </p>
  </div>
</template>

<script>
import clipboard from "clipboard";
import Header from "@/components/header";
export default {
  components: {
    Header
  },
  mounted() {
    let clipb = new clipboard(this.$refs.copy);
    clipb.on("success", () => {
      this.$message({
        message: "复制成功！快去添加您的专属客服吧！",
        type: "success"
      });
    });
    clipb.on("error", () => {
      this.$message({
        message: "复制失败！",
        type: "error"
      });
    });
  }
};
</script>

<style lang="scss" scoped>
.success-wrap {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  img {
    margin-bottom: 20px;
  }
  h1 {
    color: #383838;
    margin-bottom: 20px;
    font-size: 32px;
  }
  .p1 {
    color: #383838;
    font-size: 16px;
    font-weight: 400;
    line-height: 25px;
    margin-bottom: 20px;
  }
  .p2 {
    color: #adadad;
    line-height: 21px;
    font-size: 14px;
    span {
      color: #fe8406;
      cursor: pointer;
    }
  }
}
.p3 {
  position: absolute;
  bottom: 40px;
  width: 100%;
  text-align: center;
  color: #adadad;
  line-height: 21px;
  font-size: 12px;
  span {
    color: #fe8406;
    cursor: pointer;
  }
}
</style>